const mongoose = require('mongoose')

const userSchema = mongoose.Schema({
  // 微信的openid
  wxOpenId: {
    type: String,
    require: true
  },
  // 提问的次数
  balance: {
    type: Number,
    default: 5,
  },
  // 存储用户选择的对话模式
  model: {
    type: String,
    default: 'human'
  }
})

const userModel = mongoose.model('user', userSchema)

module.exports = {
  userModel
}